package com.aqielife.demo.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.voodoodyne.jackson.jsog.JSOGGenerator;
import lombok.Data;
import org.neo4j.ogm.annotation.EndNode;
import org.neo4j.ogm.annotation.RelationshipEntity;
import org.neo4j.ogm.annotation.StartNode;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;


/**
 * @author aqie
 * @date 2022/02/05 21:44
 * @desc
 */
@Data
@JsonIdentityInfo(generator= JSOGGenerator.class)
@RelationshipEntity(type = "know")
public class Know {
  @Id
  @GeneratedValue
  private Long id;

  @StartNode
  private UserNode from;

  @EndNode
  private UserNode to;

  public Know() {
  }

  public Know(UserNode from, UserNode to) {
    this.from = from;
    this.to = to;
  }
}
